SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwlDivisionesaCerrar
AS
SELECT     dbo.tb_DivisionesACerrar.IdDivision AS ID, dbo.tb_DivisionesACerrar.Reestructura, dbo.tb_Reestructuras.Descripcion, 
                      dbo.tb_DivisionesACerrar.Observaciones, dbo.tb_EstadosDeReestructura.Descripcion AS Estado, dbo.tb_Divisiones.Mnemo, 
                      dbo.tb_Divisiones.Descripcion AS Division
FROM         dbo.tb_DivisionesACerrar INNER JOIN
                      dbo.tb_Reestructuras ON dbo.tb_DivisionesACerrar.Reestructura = dbo.tb_Reestructuras.IDReestructura INNER JOIN
                      dbo.tb_EstadosDeReestructura ON dbo.tb_DivisionesACerrar.Estado = dbo.tb_EstadosDeReestructura.idEstadoReestructura INNER JOIN
                      dbo.tb_Divisiones ON dbo.tb_DivisionesACerrar.IdDivision = dbo.tb_Divisiones.idDivision
GO
GRANT SELECT ON  [dbo].[vwlDivisionesaCerrar] TO [Informatica]
GRANT INSERT ON  [dbo].[vwlDivisionesaCerrar] TO [Informatica]
GRANT DELETE ON  [dbo].[vwlDivisionesaCerrar] TO [Informatica]
GRANT UPDATE ON  [dbo].[vwlDivisionesaCerrar] TO [Informatica]
GRANT SELECT ON  [dbo].[vwlDivisionesaCerrar] TO [SoloVer]
GO
